<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Configuration - Fuel Documentation</title>
	<link href="../assets/css/main.css" media="screen" rel="stylesheet" />
	<script type="text/javascript" src="../assets/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="../assets/js/nav.js"></script>
	<script type="text/javascript" src="../assets/js/highlight.pack.js"></script>
	<script type="text/javascript">
		$(function() {
			show_nav('general', '../');
		});
		hljs.tabReplace = '    ';
		hljs.initHighlightingOnLoad();
	</script>
</head>
<body>

	<header>
		<h1>Fuel Documentation</h1>
	</header>

	<div id="main-nav"></div>

	<section id="content">
		<h2>Configuring your application</h2>

		<h3 id="intro">Introduction</h3>
		<p>
			The Fuel framework is build with config over convention in mind. This results in a highly customizable base on which you
			can start building your application.
		</p>
		
		<p>
			Configuration files are stored inside the <em>app/config</em> folder. The application's basic configuration is done in
			<em>app/config/config.php</em>.
		</p>
		
		<h3 id="config">Configuration options</h3>
		
		<table class="config">
				<tbody>
					<tr class="header">
						<th>Key</th>
						<th>Type</th>
						<th>Default</th>
						<th>Description</th>
					</tr>
					<tr>
						<th>base_url</th>
						<td>string</td>
						<td><pre class="php"><code>null</code></pre></td>
						<td>
							The base URL of the application. Can be relative. MUST contain a trailing slash. ('/foo/', 'http://example.com/')
						</td>
					</tr>
					<tr>
						<th>url_suffix</th>
						<td>string</td>
						<td><pre class="php"><code>''</code></pre></td>
						<td>
							Any suffix that needs to be added to URL's generated by Fuel. If the suffix is an extension, 
							make sure to include the dot. ('.html')
						</td>
					</tr>
					<tr>
						<th>index_file</th>
						<td>string</td>
						<td><pre class="php"><code>'index.php'</code></pre></td>
						<td>
							The name of the main bootstrap file. Set this to false or remove if you using mod_rewrite.
						</td>
					</tr>
					<tr>
						<th>environment</th>
						<td>string</td>
						<td><pre class="php"><code>Fuel::DEVELOPMENT</code></pre></td>
						<td>
							Your environment. <a href="../classes/fuel.html#class_constants">Read more about environment constants.</a>
						</td>
					</tr>
					<tr>
						<th>profiling</th>
						<td>bool</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							Whether to enable the profiler.
						</td>
					</tr>
					<tr>
						<th>caching</th>
						<td>bool</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							Whether to enable caching.
						</td>
					</tr>
					<tr>
						<th>cache_dir</th>
						<td>string</td>
						<td><pre class="php"><code>APPPATH.'cache/'</code></pre></td>
						<td>
							The directory to store cache files in. This directory must be writable.
						</td>
					</tr>
					<tr>
						<th>cache_lifetime</th>
						<td>int</td>
						<td><pre class="php"><code>3600</code></pre></td>
						<td>
							The cache lifetime in seconds.
						</td>
					</tr>
					<tr>
						<th>ob_callback</th>
						<td>callback</td>
						<td><pre class="php"><code>null</code></pre></td>
						<td>
							Callback given to ob_start(), set to ob_gzhandler to enable gzip encoding of output.
						</td>
					</tr>
					<tr>
						<th>errors.continue_on</th>
						<td>array</td>
						<td><pre class="php"><code>array(
	E_NOTICE,
	E_WARNING,
	E_DEPRECATED,
	E_STRICT
)</code></pre></td>
						<td>
							On which php errors to proceed execution.
						</td>
					</tr>
					<tr>
						<th>errors.throttle</th>
						<td>int</td>
						<td><pre class="php"><code>10</code></pre></td>
						<td>
							How many errors to show before we stop showing them. (prevents out-of-memory errors)
						</td>
					</tr>
					<tr>
						<th>errors.notices</th>
						<td>bool</td>
						<td><pre class="php"><code>true</code></pre></td>
						<td>
							Whether to show notices.
						</td>
					</tr>
					<tr>
						<th>language</th>
						<td>string</td>
						<td><pre class="php"><code>'en'</code></pre></td>
						<td>
							The default application language, used by the <a href="../classes/lang.html">Lang class</a>.
						</td>
					</tr>
					<tr>
						<th>locale</th>
						<td>string</td>
						<td><pre class="php"><code>'en_US'</code></pre></td>
						<td>
							Used for <em>setlocale()</em> required on some php installations.
						</td>
					</tr>
					<tr>
						<th>encoding</th>
						<td>string</td>
						<td><pre class="php"><code>'UTF-8'</code></pre></td>
						<td>
							The applications default character encoding.
						</td>
					</tr>
					<tr>
						<th>server_gmt_offset</th>
						<td>int</td>
						<td><pre class="php"><code>0</code></pre></td>
						<td>
							The offset in seconds the server offset from gmt timestamp when time() is used.
						</td>
					</tr>
					<tr>
						<th>default_timezone</th>
						<td>string</td>
						<td><pre class="php"><code>'UTC'</code></pre></td>
						<td>
							The server timezone.
						</td>
					</tr>
					<tr>
						<th>log_threshold</th>
						<td>int</td>
						<td><pre class="php"><code>Fuel::L_WARNING</code></pre></td>
						<td>
							The logging threshold. From what level of error to log. <a href="../classes/fuel.html#log_constants">Read about the possible values</a>
						</td>
					</tr>
					<tr>
						<th>log_path</th>
						<td>string</td>
						<td><pre class="php"><code>APPPATH.'logs/'</code></pre></td>
						<td>
							The directory to store the logs in. This directory MUST be writable.
						</td>
					</tr>
					<tr>
						<th>log_date_format</th>
						<td>string</td>
						<td><pre class="php"><code>'Y-m-d H:i:s'</code></pre></td>
						<td>
							The date/time format used in the logs.
						</td>
					</tr>
					<tr>
						<th>security.csrf_autoload</th>
						<td>bool</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							Whether to auto-check the crsf token. <a href="../general/security.html#csrf">Read more about csrf</a>.
						</td>
					</tr>
					<tr>
						<th>security.csrf_token_key</th>
						<td>string</td>
						<td><pre class="php"><code>'fuel_csrf_token'</code></pre></td>
						<td>
							Which $_POST key to fetch when checking the csrf token.
						</td>
					</tr>
					<tr>
						<th>security.csrf_expiration</th>
						<td>int</td>
						<td><pre class="php"><code>0</code></pre></td>
						<td>
							Set the expiration time for the csrf cookie. Anything higher that 0 is the number of sections in
							which the cookie will expire.
						</td>
					</tr>
					<tr>
						<th>security.uri_filter</th>
						<td>array</td>
						<td><pre class="php"><code>array('htmlentities')</code></pre></td>
						<td>
							What php functions to use to filter the URI.
						</td>
					</tr>
					<tr>
						<th>security.input_filter</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							What php functions filter the input arrays ($_GET, $_POST and $_COOKIE). Can be set to <em>xxs_clean</em>,
							this may cause a performance hit based on the size of the input.
						</td>
					</tr>
					<tr>
						<th>security.auto_encode_view_data</th>
						<td>bool</td>
						<td><pre class="php"><code>true</code></pre></td>
						<td>
							Whether to automatically encode (htmlentities) view data.
						</td>
					</tr>
					<tr>
						<th>security.whitelisted_classes</th>
						<td>array()</td>
						<td><pre class="php"><code>array(
	'stdClass',
	'Fuel\\Core\\View',
	'Fuel\\Core\\ViewModel',
	'Closure'
)</code></pre></td>
						<td>
							With output encoding switched on all objects passed will be converted to strings or throw exceptions
							unless they are instances of the classes in this array.
						</td>
					</tr>
					<tr>
						<th>cookie.expiration</th>
						<td>int</td>
						<td><pre class="php"><code>0</code></pre></td>
						<td>
							Number of seconds before the cookie expires.
						</td>
					</tr>
					<tr>
						<th>cookie.path</th>
						<td>string</td>
						<td><pre class="php"><code>'/'</code></pre></td>
						<td>
							Restrict the path that the cookie is available to.
						</td>
					</tr>
					<tr>
						<th>cookie.domain</th>
						<td>string</td>
						<td><pre class="php"><code>null</code></pre></td>
						<td>
							Restrict the domain that the cookie is available to.
						</td>
					</tr>
					<tr>
						<th>cookie.secure</th>
						<td>bool</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							Only transmit cookies over secure connections.
						</td>
					</tr>
					<tr>
						<th>cookie.http_only</th>
						<td>bool</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							Only transmit cookies over HTTP, disabling Javascript access.
						</td>
					</tr>
					<tr>
						<th>module_paths</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							Paths to module directories. Used when adding a module without specifying the location.
						</td>
					</tr>
					<tr>
						<th>always_load.packages</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							Which packages to autoload. Specify like so: <strong>array('package')</strong> or <strong>array('package' => PKGPATH.'path/to/package')</strong>
						</td>
					</tr>
					<tr>
						<th>always_load.modules</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							Which modules to autoload. Specify like so: <strong>array('package')</strong>. Autoloaded modules are accessible via
							the URL. In order for this to work a module path must be set in <em>module_paths</em>
						</td>
					</tr>
					<tr>
						<th>always_load.classes</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							Which classes to autoload and initiate.
						</td>
					</tr>
					<tr>
						<th>always_load.config</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							Which config files to autoload. Load a config file into a group like so: <strong>array('config')</strong> or
							<strong>array('filename' => 'group')</strong>. If you do not want to load the file into a set the group name to
							<em>null</em>: <strong>array('filename' => null)</strong>.
						</td>
					</tr>
					<tr>
						<th>always_load.language</th>
						<td>array</td>
						<td><pre class="php"><code>array()</code></pre></td>
						<td>
							Which language files to autoload. Load a config file into a group like so: <strong>array('lang')</strong> or
							<strong>array('filename' => 'group')</strong>. If you do not want to load the file into a set the group name to
							<em>null</em>: <strong>array('filename' => null)</strong>.
						</td>
					</tr>
				</tbody>
			</table>
		
	</section>

	<section id="footer">
		<p>
			<a href="http://fuelphp.com">Fuel</a> is released under the MIT license.<br />
			&copy; 2010 - 2011 Fuel Development Team
		</p>
	</section>

</body>
</html>
